export interface LoginCodeData {
    /** 是否开启验证码 */
    enable: boolean
    /** 验证码标识 */
    uuid: "admin" | "editor"
    /** 验证码图片 Base64 */
    img: string
    /** 再次获取验证码地址 */
    url: string
}

export interface LoginRequestData {
    /** admin 或 editor */
    username: "admin" | "editor"
    /** 密码 */
    password: string
    /** 验证码 */
    code: string
    /** 验证码标识 */
    uuid: string
}

export interface BaseUserInfoData {
    debug: boolean
    userCode: string
    userAccount: string
    userName: string
    roles: string[]
    roleTypes: string[]
    roleIds: string[]
    permissions: string[]
}

// #region 数据定义
export interface BaseUserData {
    userCode?: string
    userName?: string
    userAccount?: string
    userPassword?: string
    confirmPassword?: string
    pwdTipQuestionCode?: string
    pwdTipQuestionValue?: string
    pwdTipAnswer?: string
    orgCode?: string
    mobilePhone?: string
    orgName?: string
    email?: string
    qq?: string
    identityId?: string
    idCard?: string
    usbKey?: string
    userGender?: string
    userSource?: string
    staff?: string
    firstVisitTime?: string
    lastVisitTime?: string
    recentlyVisitTime?: string
    loginIp?: string
    loginMac?: string
    loginOS?: string
    userLanguage?: string
    userTheme?: string
    userAvator?: string
    userSign?: string
    appList?: string
    displayOrder?: string
    defaultPage?: string
    userDesktop?: string
    companyAdmin?: string
    organizationAdmin?: string
    allowEdit?: string
    allowDelete?: string
    deleted?: string
    createTime?: string
    creatorCode?: string
    creatorAccount?: string
    updateTime?: string
    updaterCode?: string
    updaterAccount?: string
    status?: string
    bz?: string
    bh?: string
    dm?: string
    dw?: string
    zdb001?: string
    zdb002?: string
}

export interface resp {
    token: string,
    homeUrl: string
}


export type LoginCodeResponseData = ApiResponseData<LoginCodeData>

export type LoginResponseData = ApiResponseData<{ token: string, homeUrl: string }>

export type UserInfoResponseData = ApiResponseData<BaseUserInfoData>
